home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / FAX_SSTV / VESTER_M / PCXLABEL.BAS (.txt) < prev    next >
Encoding:
GW-BASIC  |  1996-05-14  |  11.2 KB  |  262 lines

  1. 10  CLEAR,32768:KEY OFF:CLS
  2. 15  GOTO 2000
  3. 20  KEY 10,"system"+CHR$(13):KEY 5,"LIST 2000-"+CHR$(13)
  4. 22  KEY 6,"rcv"+CHR$(13):KEY 9,"txmit"+CHR$(13):KEY 4,"sve"+CHR$(13)
  5. 30  DEF SEG=&H5F00
  6. 40  BLOAD "pcxlabel.asm",&H100
  7. 44  FOR I=&HB320 TO &HE320
  8. 45  POKE I,255:NEXT I
  9. 50  PRINT:PRINT:PRINT"                          PIX LABELLING"
  10. 60  PRINT:PRINT"   This program is for labelling pix with your call sign or other words"
  11. 70  PRINT"which are cut-out of some unique background material. For example, if you"
  12. 80  PRINT"want to use mahogany wood, just make a background file which is a digital "
  13. 90  PRINT"picture taken of mahogany (usually up close). Then make a background file"
  14. 100  PRINT"of whatever color or pattern you'd like to see on edges of cut-out letters."
  15. 110  PRINT"Generally the letters will be a two color (B & W) file which came from some"
  16. 120  PRINT"computer graphics program or from using a hand scanner to capture a printed"
  17. 130  PRINT"font that caught your eye. This program is set up to accept PCX graphic"
  18. 140  PRINT"files. I use the Marstek scanner to capture. There are a number of programs"
  19. 150  PRINT"which allow you to re-size and rearrange the letters to fit and generally"
  20. 160  PRINT"tell you how many pixels wide the final file is and how many pixels (ie,"
  21. 170  PRINT"lines) long it is. You can get the three dimensional effect by first running"
  22. 180  PRINT"a new file out using the edge color or pattern for the Background file---"
  23. 190  PRINT"then using this new file as a Pix to be labelled, only this time use the"
  24. 200  PRINT"Background file that you want as the front face of the letters, and offset"
  25. 210  PRINT"vertically and horizontally this new overwrite."
  26. 220  PRINT:PRINT"   All filenames below will have their suffix added by the program."
  27. 229  PRINT:PRINT"     -----F5 to SYS CONFIG-----F10 to DOS----"
  28. 230  INPUT"    Path and Filename of PCX Label (font) file";A$
  29. 235  IF A$="" THEN GOTO 230
  30. 236  IF A$="system" THEN SYSTEM
  31. 237  IF A$="LIST 2000-" THEN CLS:GOTO 1170
  32. 240  A$=A$+".pcx"
  33. 270  PRINT:PRINT:INPUT"    Path and Filename of file to be labelled";B$
  34. 275  IF B$="" THEN GOTO 270
  35. 280  PRINT:PRINT:PRINT"    What mode is pix file ? (3)Scottie 1 (4)Scottie 2 (5)AVT90 (6)AVT94"
  36. 290  INPUT"(7)Martin 1 (77)Martin 2 (8)Wraase 96 (9)FAX480 (96)ColorFAX";I
  37. 300  IF I=0 GOTO 280
  38. 310  PRINT:PRINT:INPUT"    Plain color letters (Y or N--Default=N)";L$
  39. 320  IF L$="" THEN L$="n"
  40. 330  IF L$="n" THEN GOTO 390
  41. 340  PRINT:PRINT:INPUT"   RED component (138 to 202--138 being bright red)";R
  42. 345  IF R=0 THEN GOTO 340
  43. 350  PRINT:PRINT:INPUT"   GREEN component (138 to 202)";G
  44. 355  IF G=0 THEN GOTO 350
  45. 360  PRINT:PRINT:INPUT"   BLUE component (138 to 202)";B
  46. 365  IF B=0 THEN GOTO 360
  47. 366  IF I=7 OR I=77 THEN X=R:Y=G:Z=B:G=Z:B=X:R=Y
  48. 370  POKE &H204,184:POKE &H205,R:POKE &H207,144:POKE &H20F,184:POKE &H210,G:POKE &H212,144
  49. 380  POKE &H21A,184:POKE &H21B,B:POKE &H21D,144:POKE &H184,5:POKE &H1F5,0:GOTO 490
  50. 390  PRINT:PRINT:INPUT"    Path and Filename of Background file";C$
  51. 395  IF C$="" THEN GOTO 390
  52. 400  PRINT:PRINT:INPUT"    Mode for Background file (3)(4)(5)(6)(7)(77)(8)(9) or (96)";J
  53. 410  IF J=3 THEN C$=C$+".s1":JL=878:GOTO 490
  54. 420  IF J=4 THEN C$=C$+".s2":JL=568:GOTO 490
  55. 430  IF J=5 THEN C$=C$+".90":JL=768:GOTO 490
  56. 440  IF J=6 THEN C$=C$+".94":JL=960:GOTO 490
  57. 450  IF J=7 THEN C$=C$+".m1":JL=915:GOTO 490
  58. 455  IF J=77 THEN C$=C$+".m2":JL=464:GOTO 490
  59. 460  IF J=8 THEN C$=C$+".96":JL=745:GOTO 490
  60. 470  IF J=9 THEN C$=C$+".fax":JL=546:GOTO 490
  61. 471  IF J=96 THEN C$=C$+".cfx":JL=1638:GOTO 490
  62. 480  GOTO 400
  63. 490  PRINT:PRINT:INPUT"    Path and Filename for Output file";D$
  64. 500  IF I=3 THEN B$=B$+".s1":D$=D$+".s1":LL=878:L=288:L%=256
  65. 510  IF I=4 THEN B$=B$+".s2":D$=D$+".s2":LL=568:L=184:L%=256
  66. 520  IF I=5 THEN B$=B$+".90":D$=D$+".90":LL=768:L=256:L%=240
  67. 530  IF I=6 THEN B$=B$+".94":D$=D$+".94":LL=960:L=320:L%=200
  68. 540  IF I=7 THEN B$=B$+".m1":D$=D$+".m1":LL=915:L=302:L%=256
  69. 545  IF I=77 THEN B$=B$+".m2":D$=D$+".m2":LL=464:L=152:L%=256
  70. 550  IF I=8 THEN B$=B$+".96":D$=D$+".96":LL=745:L=248:L%=256
  71. 560  IF I=9 THEN B$=B$+".fax":D$=D$+".fax":LL=546:L%=480:POKE &H20C,88:L=195
  72. 565  IF I=96 THEN B$=B$+".cfx":D$=D$+".cfx":LL=1638:L%=480:L=546
  73. 570  PRINT:PRINT:INPUT"   Horizontal Offset in pixels (default=0)";H
  74. 580  PRINT:PRINT:INPUT"   Vertical Offset in lines from top (default=0)";VO
  75. 590  HB=INT(H/256):HA=H-256*HB:POKE &H2F7,HA:POKE &H2F8,HB:POKE &H241,HA:POKE &H242,HB
  76. 600  VB=INT((L%-VO)/256):VA=L%-VO-256*VB:POKE &H1C0,VA:POKE &H1C1,VB
  77. 610  LLB=INT(LL/256):LLA=LL-256*LLB:POKE &H1DE,LLA:POKE &H1DF,LLB:POKE &H248,LLA:POKE &H249,LLB
  78. 620  JLB=INT(JL/256):JLA=JL-256*JLB:POKE &H1EE,JLA:POKE &H1EF,JLB
  79. 630  LB=INT (L/256):LA=L-256*LB:POKE &H20D,LA:POKE &H20E,LB
  80. 640  ZL=2*L:ZLB=INT(ZL/256):ZLA=ZL-256*ZLB:POKE &H218,ZLA:POKE &H219,ZLB
  81. 650  LB%=INT(L%/256):LA%=L%-256*LB%:POKE &H1BB,LA%:POKE &H1BC,LB%
  82. 660  K=&H100:CALL K(D$,C$,B$,A$)
  83. 670  A$=D$
  84. 675  IF I=96 THEN L=546:LL=1638:P=536:GOTO 1910
  85. 700  BLOAD "vu64ba.asm",&H100
  86. 720  IF I=3 THEN L=288
  87. 730  IF I=3 THEN L=288
  88. 740  IF I=4 THEN L=184
  89. 750  IF I=5 THEN L=256
  90. 760  IF I=6 THEN L=320
  91. 770  IF I=7 THEN GOTO 1180
  92. 780  IF I=77 THEN GOTO 1180
  93. 790  IF I=8 THEN L=248
  94. 800  POKE &H226,2  'No. poked here=pixels scrolled per left arrow depression
  95. 810  POKE &H427,PT
  96. 820  IF I=9 THEN GOTO 1360
  97. 830  P=L-PT:P2=INT(P/256):P1=P-P2*256
  98. 840  POKE &H15D,P1:POKE &H15E,P2:POKE &H45B,P1:POKE &H45C,P2
  99. 850  IF I=4 THEN POKE &H3EA,16:LL=568
  100. 860  IF I=5 THEN POKE &H3EA,0:LL=768
  101. 870  IF I=7 THEN POKE &H3EA,9:LL=915
  102. 880  IF I=77 THEN POKE &H3EA,8:LL=464
  103. 890  IF I=8 THEN POKE &H3EA,1:LL=745
  104. 900  IF I=6 THEN POKE &H3EA,0:LL=960
  105. 910  IF I=3 THEN POKE &H3EA,14:LL=878
  106. 920  IF EX=0 THEN GOTO 960
  107. 930      'next two lines put in expand by 2 for modes desired
  108. 940  IF I=4 THEN P=320:POKE &H43B,235:POKE &H43C,27:POKE &H15A,0:POKE &H15B,2
  109. 950  IF I=77 THEN P=2*P:POKE &H43B,235:POKE &H43C,27:POKE &H15A,0:POKE &H15B,2
  110. 960  OF=(640-2*P)/2:OF2=INT(OF/256):OF1=OF-256*OF2:POKE &H13B,OF1:POKE &H13C,OF2
  111. 970  LL2=INT(LL/256):LL1=LL-256*LL2:POKE &H1FD,LL1:POKE &H1FE,LL2:POKE &H242,LL1:POKE &H243,LL2
  112. 980  IF V=1 THEN GOTO 1020
  113. 990  VC=0:PRINT:PRINT:PRINT"  Is Video Card (1)Trident mode 5D (2)Tseng mode 2E (3)ATI mode 62"
  114. 1000  INPUT"(4)Paradise mode 5F (5)Chips&Tech mode 79 (6)Genoa mode 5C (7)VESA (Default=1)";VC
  115. 1010  IF VC=0 THEN VC=1       'default choice
  116. 1020  IF VC=1 THEN GOTO 1540
  117. 1030  IF VC=2 THEN GOTO 1100
  118. 1040  IF VC=3 THEN GOTO 1560
  119. 1050  IF VC=4 THEN GOTO 1630
  120. 1060  IF VC=5 THEN GOTO 1700
  121. 1070  IF VC=6 THEN GOTO 1760
  122. 1080  IF VC=7 THEN GOTO 1840
  123. 1090  GOTO 990
  124. 1100  POKE &H113,46:POKE &H142,205:POKE &H144,136:POKE &H145,216:POKE &H146,238:POKE &H147,195
  125. 1110  K=&H100
  126. 1120  IF I=99 THEN CALL K(C%,S%,A$):GOTO 1140
  127. 1130  CALL K(S%,A$)
  128. 1140  PRINT:PRINT:INPUT" Choices (F2)Re-RUN (F4)SAVE (F5)BASIC (F6)RCV (F9)TXMIT (F10)DOS (Def=BASIC)";Z$
  129. 1141  IF Z$="" THEN Z$="LIST 2000-"
  130. 1145  IF Z$="RUN" THEN LOAD "pcxlabel.bas",R
  131. 1148  IF Z$="sve" THEN GOTO 1255
  132. 1150  IF Z$="LIST 2000-" THEN GOTO 1170
  133. 1155  IF Z$="system" THEN SYSTEM
  134. 1156  IF Z$="rcv" THEN LOAD"rt.bas",R
  135. 1160  IF Z$="txmit" THEN LOAD "vt.bas",R
  136. 1165  GOTO 1140
  137. 1170  CLS:PRINT"        ----F2 to Re-RUN----F10 to DOS----F5 to SYS CONFIG----":KEY 9,"files"+CHR$(34):KEY 4,"SAVE"+CHR$(34)+"PCXLABEL":END
  138. 1180  POKE &H180,128:POKE &H3DA,128:POKE &H3CB,64:POKE &H3BC,192
  139. 1190  IF I=77 THEN L=152:GOTO 800
  140. 1200  L=302:GOTO 800
  141. 1210  L=282
  142. 1250  PRINT:PRINT:INPUT"   Do you want to save last picture-y or n (Default=n)";P$
  143. 1251  IF P$="" THEN P$="n"
  144. 1252  IF P$="n" THEN GOTO 1140
  145. 1253  IF P$="y" THEN GOTO 1255
  146. 1254  GOTO 1250
  147. 1255  OF$=D$
  148. 1260  PRINT:PRINT:PRINT OF$:PRINT:PRINT:INPUT"   Save it in compressed format--y or n (Default=n)";F$
  149. 1261  IF F$="" THEN F$="n"
  150. 1262  IF F$="n" THEN GOTO 1270
  151. 1263  IF F$="y" THEN GOTO 1270
  152. 1264  GOTO 1260
  153. 1270  DEF SEG=&H4F00
  154. 1280  BLOAD "savepix.asm",&H100
  155. 1300  PI=512:PO=512:K%=0:L%=0
  156. 1310  POKE &H192,LL1:POKE &H193,LL2:POKE &H1B9,LL1:POKE &H1BA,LL2
  157. 1320  BY=3*L-1:BYB=INT(BY/256):BYA=BY-256*BYB:POKE &H20D,BYA:POKE &H20E,BYB
  158. 1330  IF S%<0 THEN S!=65536+S% ELSE S!=S%
  159. 1340  S2=INT(S!/256):S1=S!-256*S2:POKE &H163,S1:POKE &H164,S2
  160. 1360  PRINT:PRINT:PRINT"   The program will add an appropiate Mode suffix.":PRINT
  161. 1370  IF F$="y" THEN INPUT"       What Name  for Picture (Default is DO NOT SAVE)";PIX$
  162. 1375  IF F$="n" THEN INPUT" What Path\Name for Full Format Pix (Default=DO NOT SAVE)";PIX$
  163. 1380  IF PIX$="" THEN GOTO 1140
  164. 1390  IF I=3 THEN MO$=".s1":LE%=410
  165. 1400  IF I=4 THEN MO$=".s2":LE%=300
  166. 1410  IF I=5 THEN MO$=".90":LE%=360
  167. 1420  IF I=66 THEN MO$=".188":LE%=640
  168. 1430  IF I=6 THEN MO$=".94":LE%=450
  169. 1440  IF I=9 THEN MO$=".fax":LE%=480
  170. 1450  IF I=96 THEN MO$=".cfx":LE%=1440
  171. 1460  IF I=7 THEN MO$=".m1":LE%=420
  172. 1470  IF I=77 THEN MO$=".m2":LE%=300
  173. 1480  IF I=8 THEN MO$=".96":LE%=300
  174. 1490  L2=INT(LE%/256):L1=LE%-256*L2:POKE &H18B,L1:POKE &H18C,L2
  175. 1500  PF$=PIX$+MO$
  176. 1505  IF F$="y" THEN PF$=DR$+":"+PF$
  177. 1510  K=&H100:CALL K(K%,L%,OF$,PF$)
  178. 1520  IF F$="n" THEN GOTO 1140
  179. 1522  IF F$="y"THEN PRINT:PRINT:INPUT"   What path/directory for compressed file";X$:GOTO 1524
  180. 1523  GOTO 1522
  181. 1524  SHELL "pk "+X$+" "+DR$+":"+" "+PIX$+" "+MO$
  182. 1525  GOTO 1140
  183. 1540  IF I=6 THEN POKE &H113,&H5C
  184. 1550  GOTO 1110
  185. 1560  POKE &H113,&H62:POKE &H444,192:POKE 321,235:POKE 322,90  'ATI video mode 62
  186. 1570  POKE 324,136:POKE 325,196
  187. 1580  POKE 326,128:POKE 327,228:POKE 328,225:POKE 329,208:POKE 330,227:POKE 331,8
  188. 1590  POKE 332,220:POKE 333,176:POKE 334,178:POKE 335,254:POKE 336,202:POKE 337,239:POKE 338,195
  189. 1600  IF I=99 THEN POKE &H16A,128:POKE &H16B,2:POKE &H155,224:POKE &H156,1:POKE 321,233:POKE 322,66:POKE 323,4:POKE &H58A,192
  190. 1610  IF I=6 THEN POKE &H113,&H61
  191. 1620  GOTO 1110
  192. 1630  POKE &H113,&H5F:POKE 321,186:POKE 322,206          'Paradise video mode 5f
  193. 1640  POKE 323,3:POKE 324,176:POKE 325,9:POKE 326,136:POKE 327,220:POKE 328,208
  194. 1650  POKE 329,228:POKE 330,208:POKE 331,228:POKE 332,208:POKE 333,228:POKE 334,208:POKE 335,228
  195. 1660  POKE 336,239:POKE 337,195
  196. 1670  IF I=99 THEN POKE &H16A,128:POKE &H16B,2:POKE &H155,224:POKE &H156,1
  197. 1680  'IF I=6 THEN POKE &H113,&H5E
  198. 1690  GOTO 1110
  199. 1700  POKE &H113,&H79:POKE 321,186:POKE 322,214            'Chips & Tech Mode 79
  200. 1710  POKE 323,3:POKE 324,176:POKE 325,16:POKE 326,136:POKE 327,220:POKE 328,177
  201. 1720  POKE 329,BS:POKE 330,210:POKE 331,228:POKE 332,239:POKE 333,195
  202. 1730  IF I=99 THEN POKE &H16A,128:POKE &H16B,2:POKE &H155,224:POKE &H156,1
  203. 1740  IF I=6 THEN POKE &H113,&H78
  204. 1750  GOTO 1110
  205. 1760  POKE &H113,&H5C:POKE 321,186:POKE 322,196                   'Genoa mode 5c
  206. 1770  POKE 323,3:POKE 324,176:POKE 325,6:POKE 326,238:POKE 327,66:POKE 328,236
  207. 1780  POKE 329,36:POKE 330,199:POKE 331,128:POKE 332,227:POKE 333,7:POKE 334,208
  208. 1790  POKE 335,227:POKE 336,208:POKE 337,227:POKE 338,208:POKE 339,227:POKE 340,8
  209. 1800  POKE 341,216:POKE 342,238:POKE 343,195
  210. 1810  IF I=99 THEN POKE &H16A,128:POKE &H16B,2:POKE &H155,224:POKE &H156,1
  211. 1820  IF I=6 THEN POKE &H113,&H7E
  212. 1830  GOTO 1110
  213. 1840  IF VC=4 THEN GOTO 1901
  214. 1845  POKE &H111,79:POKE &H113,2:POKE 321,177                   'VESA mode 101
  215. 1850  POKE 322,BS:POKE 323,210:POKE 324,227:POKE 325,136:POKE 326,218
  216. 1860  POKE 327,48:POKE 328,246:POKE 329,184:POKE 330,5:POKE 331,79:POKE 332,49:POKE 333,219:POKE 334,205
  217. 1861  POKE 335,16:POKE 336,195
  218. 1870  IF S=1 THEN POKE &H44A,5:GOTO 1900
  219. 1880  IF I=99 THEN POKE &H16A,128:POKE &H16B,2:POKE &H155,224:POKE &H156,1
  220. 1890  'IF I=6 THEN POKE &H398,0
  221. 1900  GOTO 1110
  222. 1901  POKE &H113,&H72:POKE 321,186:POKE 322,206          'Paradise video mode 72
  223. 1902  POKE 323,3:POKE 324,176:POKE 325,9:POKE 326,136:POKE 327,220:POKE 328,208
  224. 1903  POKE 329,228:POKE 330,208:POKE 331,228:POKE 332,208:POKE 333,228:POKE 334,208:POKE 335,228
  225. 1904  POKE 336,239:POKE 337,195
  226. 1905  IF I=99 THEN POKE &H16A,128:POKE &H16B,2:POKE &H155,224:POKE &H156,1
  227. 1906  'IF I=6 THEN POKE &H113,&H5E
  228. 1907  GOTO 1110
  229. 1910  BLOAD "trushof.asm",&H100
  230. 1912  IF BP=4 THEN POKE &H3CC,235:POKE &H3CD,32:POKE &H5CB,235:POKE &H5CC,187
  231. 1913  IF BP=2 THEN POKE &H398,17:POKE &H319,17:POKE &H18D,17:POKE &H17A,233:POKE &H17B,67:POKE &H17C,5
  232. 1915  P2=INT(P/256):P1=P-256*P2:POKE &H3B0,P1:POKE &H3B1,P2:POKE &H46B,P1:POKE &H46C,P2
  233. 1920  OF=BP*(640-P)/2:OF2=INT(OF/256):OF1=OF-256*OF2:POKE &H13C,OF1:POKE &H13D,OF2:POKE &H512,OF1:POKE &H513,OF2
  234. 1925  Z=2*L:ZB=INT(Z/256):ZA=Z-256*ZB:POKE &H3CA,ZA:POKE &H3CB,ZB
  235. 1930  W=2*L+32:WB=INT(W/256):WA=W-256*WB:POKE &H3A9,WA:POKE &H3AA,WB:POKE &H3E5,WA:POKE &H3E6,WB
  236. 1935  LB=INT(L/256):LA=L-256*LB:POKE &H3BC,LA:POKE &H3BD,LB:POKE &H3C3,LA:POKE &H3C4,LB
  237. 1940  U=BP*L:UB=INT(U/256):UA=U-256*UB:POKE &H55F,UA:POKE &H560,UB:POKE &H531,UA:POKE &H532,UB
  238. 1945  POKE &H427,10:POKE &H226,2  'poke to &h226 is pixels per left arrow depress
  239. 1950  LL2=INT(LL/256):LL1=LL-256*LL2:POKE &H1FD,LL1:POKE &H1FE,LL2:POKE &H242,LL1:POKE &H243,LL2:POKE &H15D,LL1:POKE &H15E,LL2
  240. 1955  Q=BL-BP*P:QB=INT(Q/256):QA=Q-256*QB:POKE &H3D6,QA:POKE &H3D7,QB
  241. 1960  POKE &H39A,233:POKE &H39B,107:POKE &H39C,253:POKE &H11A,0:POKE &H11B,0:POKE &H2B8,235:POKE &H2B9,6:POKE &H3AC,1:POKE &H3B4,1
  242. 1965  POKE &H3A2,224:POKE &H3A3,1
  243. 1970  GOTO 1840
  244. 2000     '                   SYSTEM CONFIGURATION
  245. 2010     'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  246. 2020  V=1     'V=0 is manual video card choice---V=1 is automatic choice
  247. 2030  VC=7    'Video card 1=Trident 2=Tseng 3=ATI 4=Paradise 5=Chips 6=Genoa
  248. 2040          '7=VESA (VESA card or VESA driver.Pick BS below to get full pix).
  249. 2045  BS=4    'Bank shift for different VESA configurations-values from 0 to 6
  250. 2046  BL=2048 'Bytes/Line in TRUCOLOR modes--ATI=1920 and Diamond PRO=2048
  251. 2047  BP=3    'Bytes/Pixel--use 3 for 1 mb Vcards--some 2 mb cards use BP=4
  252. 2050  DR$="d" 'RAMDISK drive designation--make letter D match your drive
  253. 2060  BR=2    'Robot brightness control-br=2 is high-br=1 is med-br=0 is low
  254. 2070  TU=2    'Robot tuning increment with F and G in ten's of cycles
  255. 2080  PT=6    'Pixels trimmed from edge of picture--see line 810 for Robot
  256. 2090  EX=1    'For S2 and M2. EX=0 is as rcvd. EX=1 is EXpanded to fill screen
  257. 2100  GOTO 20
  258. 2110                            'INSTRUCTIONS
  259. 2120    'To change, move cursor and type over present value and ENTER. Then move
  260. 2130    'cursor into clear and hit F5 to check what you typed. To SAVE the change
  261. 2140    'hit F4 and ENTER. Otherwise hit F2 to reRUN with temporary change.
  262.